﻿using System.Windows;
using LayeredArchitectureSample.ViewModel;

namespace LayeredArchitectureSample.ClientBrowser
{
    /// <summary>
    /// Interaction logic for ErrorView.xaml
    /// </summary>
    public partial class ErrorView : Window
    {
        private readonly ErrorViewModel _viewModel;

        public ErrorView(ErrorViewModel viewModel)
        {
            _viewModel = viewModel;

            InitializeComponent();

            this.DataContext = viewModel;
        }

        private void OkButtonClick(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void DetailExpanderHasBeenExpanded(object sender, RoutedEventArgs e)
        {
            this.ErrorMessageScrollViewer.Height = 150;
        }

        private void DetailExpanderHasBeenCollapsed(object sender, RoutedEventArgs e)
        {
            this.ErrorMessageScrollViewer.Height = 300;
        }
    }
}